package edu.mis.modules.recharge;

import com.jfinal.core.Controller;

import edu.mis.modules.user.UserService;

public class RechargeController extends Controller{
	
	static UserService userService = new UserService();
	static RechargeService rechargeService = new RechargeService();
	
	
	public void index() {
		if(userService.findUserWithRole().equals(1) || userService.findUserWithRole().equals(2)) {
			render("recharge.html");
		}else {
			render("noAllAuthority.html");	 
		}
	}
	
	
	/**
	 * 日志列表后台json
	 */
	
	public void list(){   
		setAttr("data", rechargeService.findAllRecharge());
		renderJson();   
	}
	
}
